import request from '@/utils/request'
// 获取请求
export const articleLinkAPI = ({ current, sorter }) => {
  return request.get('/h5/interview/query', {
    params: {
      current: current,
      pageSize: 10,
      sorter: sorter
    }
  })
}
// 获取单个面试题详情
export const getArticleDetail = (id) => {
  return request.get('/h5/interview/show', { params: { id: id } })
}
// 点赞,取消点赞,收藏,取消收藏
export const updateLikeAndCollect = ({ id, optType }) => {
  return request.post('/h5/interview/opt', {
    id,
    optType: optType // 1喜欢  2收藏
  })
}
// 获取收藏和喜欢列表
export const collectAndLikeListAPI = ({ page, optType }) => {
  return request.get('/h5/interview/opt/list', {
    params: {
      page,
      optType: optType
    }
  })
}
